#ifndef LUCNX_IDE_H
#define LUCNX_IDE_H

#include <Lucnx/mutex.h>

typedef struct disk_t
{
    int device_no;
    char name[16];
    struct ide_ctrl_t *ctrl;
}disk_t;

typedef struct ide_ctrl_t
{
    char name[16];
    disk_t devices[2];
    u8 irq;
    u16 port;
    lock_t lock;
    task_t *waiter;
}ide_ctrl_t;

int ide_read(disk_t *device, u32 lba, void *buf, u8 count);
int ide_write(disk_t *device, u32 lba, void *buf, u8 count);

void ide_init();

#endif